<?php
/**
+--------------------------------------------------------------
 * User: maqun
+--------------------------------------------------------------
 * Date: 2015/12/12
+--------------------------------------------------------------
 * Time: 17:53
+--------------------------------------------------------------
 * 名校联赛列表 调用接口显示数据
+--------------------------------------------------------------
 */
class RecentContestAction extends BaseAction{

    public function _initialize(){
        self::$action = 6;
        parent::_initialize();
    }
    public function index(){

        $json = @file_get_contents('http://contests.acmicpc.info/contests.json') or $this->error('页面访问错误，请刷新页面');
        $list = json_decode($json,true);
        $this->assign('list',$list);
        $this->display('index');
    }
}